/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Vectors.MultiThreding;

import Vectors.IVector;

/**
 *
 * @author netcracker
 */
public class ReaderThread extends Thread{
    IVector vector;

    public ReaderThread(IVector vector) {
        this.vector = vector;
    }

    @Override
    public void run() {
        read();
    }
    
    private void read(){
        for (int i=0;i<vector.getLength();i++) {
            System.out.println("Read: "+vector.get(i)+" from position "+i);
        }
    }
}
